The present invention relates to a packet communication apparatus that transmits and receives data that is divided into packets, and more particularly to packet data copy means and checksum calculation means used for transmitting and receiving packet data.
Most communications via the Internet and LANs are packet communications based on the TCP/IP protocol.
TCP/IP consists of a hierarchy of programs for protocol processing. For example, a packet received by a communication circuit, which works as the network interface, is processed sequentially by a hierarchy of programs. That is, the packet is passed to the Ethernet (registered trademark) driver, received by IP, received by TCP or UDP (User Datagram Protocol), and then processed by application software programs.
In a packet transmission, a packet is transmitted from the communication circuit by performing the above processing in a reverse order.
In addition, the IP or UDP software calculates the checksum of the header, and the TCP software calculates the checksum of the header and the data, to check for a communication error.
However, because the checksum calculation is performed for the all the packets when data is transmitted and received, the software processing of the checksum calculation requires long time and prevents the transmission/reception performance from being improved.
Some methods are proposed to solve this problem. For example, considering the fact that the reception amount is larger than the transmission amount on a network terminal, a method is proposed for calculating the checksum via hardware at reception time to speed up the calculation (For example, see JP-A-10-190481 (pages 3-4, FIGS. 2-4) and JP-A-2001-111558 (pages 2-4, FIG. 1, FIGS. 3-5)